<template>
  <div  class="detail-component">
	  <div class="item">
	  	<span class="label">姓名</span>
	  	<span class="value">{{detailData.name}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">电话</span>
	  	<span class="value">{{detailData.phone}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">邮箱</span>
	  	<span class="value">{{detailData.email}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">账号</span>
	  	<span class="value">{{detailData.account}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">角色</span>
	  	<span class="value">{{detailData.roleName}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">状态</span>
	  	<span class="value">{{detailData.statusName}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">创建时间</span>
	  	<span class="value">{{detailData.createTime}}</span>
	  </div>
	  <div class="item">
	  	<span class="label">修改时间</span>
	  	<span class="value">{{detailData.modifyTime}}</span>
	  </div>
  </div>
</template>
<script>
export default {
	props:{
	  rowId:{
	    type:String,
	    default:"",
	    required:true,
	  },
		userStatusList:{
			type:Array,
			default:()=>[],
			required:true
		},
		roleList:{
			type:Array,
			default:()=>[],
			required:true
		}
	},
  data() {
    return {
      detailData: {
        name: "",
		sex:"",
		sexName:"",
        areaName: "",
        deptName: "",
        remark: "",
        statusName: "",
        account: "",
        roleIds: "",
        roleNames:'',
        createTime: "",
		modifyTime:"",
        phone: "",
		email:"",
      },
      showDialog: false
    };
  },
  watch:{
    rowId(vv){
  		this.getDetailData()
    }
  },
  methods: {
    getDetailData() {
		if(!this.rowId){
			return
		}
      this.$http.getUserDetail({id:this.rowId})
      .then(res => {
		  var data=res.data.data ||{};
		  this.detailData = data;
		}).catch(err => {
		  throw(err)
		});
    },

  },
  created() {
    this.getDetailData();
  }
};
</script>
